import os
import json
abspath = 'database/data.json'
databse = os.path.join(os.getcwd(), abspath)
def write_data():
    data = {
          "user": "admin",
          "password": 123456
        }
    with open(databse, 'w') as f:
        json.dump(data, f, indent=2)

def read_data():
    with open(databse, 'r') as f:
        data = json.load(f)
        return data
        
if __name__ == '__main__':
    user, password = read_data()['user'], read_data()['password']
    print(user, password)